<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
   
   <meta name="description" content="command line parsing">
    
    <meta name="author" content="John S. Urban" >
    <link rel="icon" href="../favicon.png">

    <title>basic &ndash; M_CLI2</title>

    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/pygments.css" rel="stylesheet">
    <link href="../css/font-awesome.min.css" rel="stylesheet">
    <link href="../css/local.css" rel="stylesheet">
    
    <link  href="../tipuesearch/tipuesearch.css" rel="stylesheet">
    
    

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    <script src="../js/jquery-2.1.3.min.js"></script>
    <script src="../js/svg-pan-zoom.min.js"></script>

  </head>

  <body>

    <!-- Fixed navbar -->
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="../index.html">M_CLI2 </a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
        
            <li class="dropdown hidden-xs visible-sm visible-md hidden-lg">
              <a href="#" class="dropdown-toggle"
              data-toggle="dropdown" role="button"
              aria-haspopup="true"
     aria-expanded="false">Contents <span class="caret"></span></a>
        <ul class="dropdown-menu">
          
              
            <li><a href="../lists/files.html">Source Files</a></li>
        
        
        
            <li><a href="../lists/modules.html">Modules</a></li>
        
            
                                
            <li><a href="../lists/procedures.html">Procedures</a></li>
        
               
            <li><a href="../lists/types.html">Derived Types</a></li>
        
        
            <li><a href="../lists/programs.html">Programs</a></li>
        
            </ul>
            </li>


<li class="visible-xs hidden-sm visible-lg"><a href="../lists/files.html">Source Files</a></li>



<li class="visible-xs hidden-sm visible-lg"><a href="../lists/modules.html">Modules</a></li>



<li class="visible-xs hidden-sm visible-lg"><a href="../lists/procedures.html">Procedures</a></li>

                             
<li class="visible-xs hidden-sm visible-lg"><a href="../lists/types.html">Derived Types</a></li>


<li class="visible-xs hidden-sm visible-lg"><a href="../lists/programs.html">Programs</a></li>

          </ul>
        
        <form action="../search.html" class="navbar-form navbar-right" role="search">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Search" name="q" id="tipue_search_input" autocomplete="off" required>
        </div>
<!--
        <button type="submit" class="btn btn-default">Submit</button>
-->
        </form>
        
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div class="container">
    
  
  <div class="row">
    <h1>basic
    <small>Program</small>
    
    </h1>
    
<div class="row">
  <div class="col-lg-12">
<div class="well well-sm">
  <ul class="list-inline" style="margin-bottom:0px;display:inline">
     
     
     
     
    
    
     <li><i class="fa fa-list-ol"></i>
       <a data-toggle="tooltip"
    data-placement="bottom" data-html="true"
    title="20.1% of total for programs.">129 statements</a>
     </li> 
     
     
     
    <li><i class="fa fa-code"></i><a href="../src/test_suite_M_CLI2.f90"> Source File</a></li>
     
     
  </ul>
  <ol class="breadcrumb in-well text-right">
  
    
     <li><a href='../sourcefile/test_suite_m_cli2.f90.html'>test_suite_M_CLI2.f90</a></li>
    
  
     <li class="active">basic</li>
  </ol>
</div>
</div>
</div>
<script>
  $(function () {
  $('[data-toggle="tooltip"]').tooltip()
  })
</script>

  </div>
  
  <div class="row">
    <div class="col-md-3 hidden-xs hidden-sm visible-md visible-lg">
    
<div id="sidebar">
  
<h3>Contents</h3>
 



<div class="panel panel-primary">
  <div class="panel-heading text-left"><h3 class="panel-title"><a data-toggle="collapse" href="#vars-0">Variables</a></h3></div>
  <div id="vars-0" class="panel-collapse collapse">
    <div class="list-group">
      
      <a class="list-group-item" href="../program/basic.html#variable-c_aarr">c_aarr</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-c_three">c_three</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-c_x">c_x</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-c_y">c_y</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-c_z">c_z</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-casen">casen</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-cmd~2">cmd</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-command">command</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-e">e</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-gen">gen</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-i~8">i</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-ints~3">ints</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-ithree">ithree</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-l_x">l_x</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-l_y">l_y</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-lfive">lfive</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-logicals~2">logicals</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-r_x">r_x</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-r_y">r_y</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-r_z">r_z</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-reals~2">reals</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-rfour">rfour</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-string~4">string</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-x~14">x</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-y~14">y</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-z~10">z</a>
      
    </div>
  </div>
</div>













<div class="panel panel-primary">
  <div class="panel-heading text-left"><h3 class="panel-title"><a data-toggle="collapse" href="#subs-0">Subroutines</a></h3></div>
  <div class="list-group">
    <div id="subs-0" class="panel-collapse collapse">
      
      <a class="list-group-item" href="../program/basic.html#proc-printit">printit</a>
      
      <a class="list-group-item" href="../program/basic.html#proc-readcli">readcli</a>
      
      <a class="list-group-item" href="../program/basic.html#proc-runit">runit</a>
      
    </div>
  </div>
</div>









<div class="panel panel-primary">
  <div class="panel-heading text-left"><h3 class="panel-title">Source Code</h3></div>
  <div class="list-group">
    <a class="list-group-item" href="../program/basic.html#src">basic</a>
  </div>
</div>



</div>

    </div>
    
    <div class="col-md-9" id='text'>
    
  
    <div class="panel panel-default">
      <div class="panel-heading">
  <h3 class="panel-title">Uses</h3>
      </div>
      <ul class="list-group">
      
      <li class="list-group-item">
  <ul class="list-inline">
    
    <li><a href='../module/m_cli2.html'>M_CLI2</a></li>
    
    <li><a href='../module/m_cli2.html'>M_CLI2</a></li>
    
  </ul>
      </li>
      
      
      
      </ul>
    </div>
    

    <p>STACK OF TESTS &ndash; some systems will have a limit on how much process spawning is allowed</p>
    
    <br>

     <section class="visible-xs visible-sm hidden-md">
       
<h3>Contents</h3>
 



<div class="panel panel-primary">
  <div class="panel-heading text-left"><h3 class="panel-title"><a data-toggle="collapse" href="#vars-1">Variables</a></h3></div>
  <div id="vars-1" class="panel-collapse collapse">
    <div class="list-group">
      
      <a class="list-group-item" href="../program/basic.html#variable-c_aarr">c_aarr</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-c_three">c_three</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-c_x">c_x</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-c_y">c_y</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-c_z">c_z</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-casen">casen</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-cmd~2">cmd</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-command">command</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-e">e</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-gen">gen</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-i~8">i</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-ints~3">ints</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-ithree">ithree</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-l_x">l_x</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-l_y">l_y</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-lfive">lfive</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-logicals~2">logicals</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-r_x">r_x</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-r_y">r_y</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-r_z">r_z</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-reals~2">reals</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-rfour">rfour</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-string~4">string</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-x~14">x</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-y~14">y</a>
      
      <a class="list-group-item" href="../program/basic.html#variable-z~10">z</a>
      
    </div>
  </div>
</div>













<div class="panel panel-primary">
  <div class="panel-heading text-left"><h3 class="panel-title"><a data-toggle="collapse" href="#subs-1">Subroutines</a></h3></div>
  <div class="list-group">
    <div id="subs-1" class="panel-collapse collapse">
      
      <a class="list-group-item" href="../program/basic.html#proc-printit">printit</a>
      
      <a class="list-group-item" href="../program/basic.html#proc-readcli">readcli</a>
      
      <a class="list-group-item" href="../program/basic.html#proc-runit">runit</a>
      
    </div>
  </div>
</div>









<div class="panel panel-primary">
  <div class="panel-heading text-left"><h3 class="panel-title">Source Code</h3></div>
  <div class="list-group">
    <a class="list-group-item" href="../program/basic.html#src">basic</a>
  </div>
</div>



     </section>
     <br class="visible-xs visible-sm hidden-md">

     

    
    <section>
    <h2>Variables</h2>
    
<table class="table table-striped varlist">
<thead><tr><th>Type</th>

<th>Attributes</th><th></th><th>Name</th><th></th><th>Initial</th><th></th></thead>



<tbody>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-c_aarr"></span>complex,</td>
  
  
  <td>allocatable</td><td>::</td>
  <td><strong>c_aarr</strong>(:)</td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-c_three"></span>complex</td>
  
  
  <td></td><td>::</td>
  <td><strong>c_three</strong>(3)</td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-c_x"></span>complex</td>
  
  
  <td></td><td>::</td>
  <td><strong>c_x</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-c_y"></span>complex</td>
  
  
  <td></td><td>::</td>
  <td><strong>c_y</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-c_z"></span>complex</td>
  
  
  <td></td><td>::</td>
  <td><strong>c_z</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-casen"></span>integer</td>
  
  
  <td></td><td>::</td>
  <td><strong>casen</strong></td><td> =</td><td>0</td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-cmd~2"></span>character(len=4096)</td>
  
  
  <td></td><td>::</td>
  <td><strong>cmd</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-command"></span>character(len=:),</td>
  
  
  <td>allocatable</td><td>::</td>
  <td><strong>command</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-e"></span>integer</td>
  
  
  <td></td><td>::</td>
  <td><strong>e</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-gen"></span>character(len=*),</td>
  
  
  <td>parameter</td><td>::</td>
  <td><strong>gen</strong></td><td> =</td><td>'(*(g0,1x))'</td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-i~8"></span>integer</td>
  
  
  <td></td><td>::</td>
  <td><strong>i</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-ints~3"></span>integer,</td>
  
  
  <td>allocatable</td><td>::</td>
  <td><strong>ints</strong>(:)</td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-ithree"></span>integer</td>
  
  
  <td></td><td>::</td>
  <td><strong>ithree</strong>(3)</td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-l_x"></span>logical</td>
  
  
  <td></td><td>::</td>
  <td><strong>l_x</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-l_y"></span>logical</td>
  
  
  <td></td><td>::</td>
  <td><strong>l_y</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-lfive"></span>logical</td>
  
  
  <td></td><td>::</td>
  <td><strong>lfive</strong>(5)</td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-logicals~2"></span>logical,</td>
  
  
  <td>allocatable</td><td>::</td>
  <td><strong>logicals</strong>(:)</td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-r_x"></span>real</td>
  
  
  <td></td><td>::</td>
  <td><strong>r_x</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-r_y"></span>real</td>
  
  
  <td></td><td>::</td>
  <td><strong>r_y</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-r_z"></span>real</td>
  
  
  <td></td><td>::</td>
  <td><strong>r_z</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-reals~2"></span>real,</td>
  
  
  <td>allocatable</td><td>::</td>
  <td><strong>reals</strong>(:)</td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-rfour"></span>real</td>
  
  
  <td></td><td>::</td>
  <td><strong>rfour</strong>(4)</td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-string~4"></span>character(len=30)</td>
  
  
  <td></td><td>::</td>
  <td><strong>string</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-x~14"></span>integer</td>
  
  
  <td></td><td>::</td>
  <td><strong>x</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-y~14"></span>integer</td>
  
  
  <td></td><td>::</td>
  <td><strong>y</strong></td><td></td><td></td><td></td>
  
</tr>

  
  
  
  
<tr>
  
  <td><span class="anchor" id="variable-z~10"></span>integer</td>
  
  
  <td></td><td>::</td>
  <td><strong>z</strong></td><td></td><td></td><td></td>
  
</tr>

</tbody>
</table>

    </section>
    <br>
    
    
    
    
    
    
    

    
    
    


    
    <section>
    <h2>Subroutines</h2>
    
    
  <div class="panel panel-default">
  <div class="panel-heading codesum"><span class="anchor" id="proc-printit"></span><h3>
subroutine <a href='../proc/printit.html'>printit</a>(testit)
    
    
   
</h3></div>
  <div class="panel-body">
       
    
    
    <h4>Arguments</h4>
    
      
      
<table class="table table-striped varlist">
<thead><tr><th>Type</th>
<th>Intent</th><th>Optional</th>
<th>Attributes</th><th></th><th>Name</th><th></th></thead>



<tbody>

  
  
  
  
<tr>
  
  <td><span class="anchor" ></span>logical</td>
  <td></td>
  <td></td>
  
  <td></td><td>::</td>
  <td><strong>testit</strong></td><td></td>
  
</tr>

</tbody>
</table>

      
    
    

  </div>
  </div>

    
    
  <div class="panel panel-default">
  <div class="panel-heading codesum"><span class="anchor" id="proc-readcli"></span><h3>
subroutine <a href='../proc/readcli.html'>readcli</a>()
    
    
   
</h3></div>
  <div class="panel-body">
       
    
    
    <h4>Arguments</h4>
    
      <em>None</em>
    
    

  </div>
  </div>

    
    
  <div class="panel panel-default">
  <div class="panel-heading codesum"><span class="anchor" id="proc-runit"></span><h3>
subroutine <a href='../proc/runit.html'>runit</a>(string)
    
    
   
</h3></div>
  <div class="panel-body">
       
    
    
    <h4>Arguments</h4>
    
      
      
<table class="table table-striped varlist">
<thead><tr><th>Type</th>
<th>Intent</th><th>Optional</th>
<th>Attributes</th><th></th><th>Name</th><th></th></thead>



<tbody>

  
  
  
  
<tr>
  
  <td><span class="anchor" ></span>character(len=*),</td>
  <td>intent(in)</td>
  <td></td>
  
  <td></td><td>::</td>
  <td><strong>string</strong></td><td></td>
  
</tr>

</tbody>
</table>

      
    
    

  </div>
  </div>

    
    </section>    
    
    
    
    <section>
    <h2 id="src">Source Code</h2>
    <div class="highlight"><pre><span></span><span class="k">program </span><span class="n">basic</span>
<span class="c">!! STACK OF TESTS -- some systems will have a limit on how much process spawning is allowed</span>
<span class="k">use </span><span class="n">M_CLI2</span><span class="p">,</span>  <span class="k">only</span> <span class="p">:</span> <span class="n">set_args</span><span class="p">,</span> <span class="n">get_args</span>
<span class="k">use </span><span class="n">M_CLI2</span><span class="p">,</span>  <span class="k">only</span> <span class="p">:</span> <span class="n">get_args_fixed_length</span><span class="p">,</span> <span class="n">get_args_fixed_size</span>
<span class="k">implicit none</span>

<span class="kt">integer</span>                      <span class="kd">::</span> <span class="n">casen</span><span class="o">=</span><span class="mi">0</span>

<span class="kt">integer</span>                      <span class="kd">::</span> <span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">z</span>      
<span class="kt">integer</span>                      <span class="kd">::</span> <span class="n">ithree</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<span class="kt">integer</span><span class="p">,</span><span class="k">allocatable</span>          <span class="kd">::</span> <span class="n">ints</span><span class="p">(:)</span>

<span class="kt">real</span>                         <span class="kd">::</span> <span class="n">r_x</span><span class="p">,</span><span class="n">r_y</span><span class="p">,</span><span class="n">r_z</span>      
<span class="kt">real</span>                         <span class="kd">::</span> <span class="n">rfour</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span>
<span class="kt">real</span><span class="p">,</span><span class="k">allocatable</span>             <span class="kd">::</span> <span class="n">reals</span><span class="p">(:)</span>

<span class="kt">logical</span>                      <span class="kd">::</span> <span class="n">l_x</span><span class="p">,</span><span class="n">l_y</span>
<span class="kt">logical</span>                      <span class="kd">::</span> <span class="n">lfive</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
<span class="kt">logical</span><span class="p">,</span><span class="k">allocatable</span>          <span class="kd">::</span> <span class="n">logicals</span><span class="p">(:)</span>

<span class="kt">character</span><span class="p">(</span><span class="nb">len</span><span class="o">=</span><span class="mi">30</span><span class="p">)</span>            <span class="kd">::</span> <span class="n">string</span>     

<span class="kt">complex</span>                      <span class="kd">::</span> <span class="n">c_x</span><span class="p">,</span> <span class="n">c_y</span><span class="p">,</span> <span class="n">c_z</span>   <span class="c">! scalars</span>
<span class="kt">complex</span><span class="p">,</span><span class="k">allocatable</span>          <span class="kd">::</span> <span class="n">c_aarr</span><span class="p">(:)</span>       <span class="c">! allocatable array</span>
<span class="kt">complex</span>                      <span class="kd">::</span> <span class="n">c_three</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>      <span class="c">! fixed-size array</span>

<span class="kt">character</span><span class="p">(</span><span class="nb">len</span><span class="o">=</span><span class="p">:),</span><span class="k">allocatable</span> <span class="kd">::</span> <span class="n">command</span>
<span class="kt">character</span><span class="p">(</span><span class="nb">len</span><span class="o">=</span><span class="mi">4096</span><span class="p">)</span>          <span class="kd">::</span> <span class="n">cmd</span>
<span class="kt">integer</span>                      <span class="kd">::</span> <span class="n">e</span>
<span class="kt">integer</span>                      <span class="kd">::</span> <span class="n">i</span>
<span class="kt">character</span><span class="p">(</span><span class="nb">len</span><span class="o">=*</span><span class="p">),</span><span class="k">parameter</span>   <span class="kd">::</span> <span class="n">gen</span><span class="o">=</span><span class="s1">&#39;(*(g0,1x))&#39;</span>

   <span class="k">call </span><span class="nb">get_command_argument</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="n">cmd</span><span class="p">)</span> <span class="c">! get name of this executable</span>
   <span class="n">e</span><span class="o">=</span><span class="nb">len_trim</span><span class="p">(</span><span class="n">cmd</span><span class="p">)</span><span class="o">+</span><span class="mi">1</span>
   
   <span class="n">command</span><span class="o">=</span><span class="s1">&#39; &amp;</span>
<span class="s1">   &amp; --ints 11,22,33 &amp;</span>
<span class="s1">   &amp; -x 10 -y 20 -z 10#30 &amp;</span>
<span class="s1">   &amp; --ithree -1,-2,-3 &amp;</span>
<span class="s1">   ! character</span>
<span class="s1">   &amp; -string &quot;My string,&quot;&quot;again&quot; &amp;</span>
<span class="s1">   ! real</span>
<span class="s1">   &amp; -r_x -8 -r_y -88 -r_z -888 &amp;</span>
<span class="s1">   &amp; --reals 1.2,2.3,3.4,4.5,5.6,6.7,7.8 &amp;</span>
<span class="s1">   &amp; --rfour 1.1,2.2,3.3,4.4 &amp;</span>
<span class="s1">   ! logical</span>
<span class="s1">   &amp; --logicals T:.true:.TRUE.:.false.:F:FALSE:TRUE -l_x T -l_y F -lfive T,F,T,F,T &amp; </span>
<span class="s1">   ! complex</span>
<span class="s1">   &amp; --c_three -999,-999,-999,-999,-999,-999 &amp;</span>
<span class="s1">   &amp; -c_x -999,-999 -c_y -999,-999 -c_z -999,-999 &amp;</span>
<span class="s1">   &amp; --c_aarr -999:-999::-999:-999 &amp;</span>
<span class="s1">   ! case number</span>
<span class="s1">   &amp; -casen 0 &amp;</span>
<span class="s1">   &amp;&#39;</span>
   <span class="k">call </span><span class="n">readcli</span><span class="p">()</span>                              <span class="c">! assume initially called with no parameters so that parameters are default values</span>
   <span class="k">select case</span><span class="p">(</span><span class="n">casen</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;COMMAND:&#39;</span><span class="p">,</span><span class="n">command</span>
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;check defaults&#39;</span>

      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;default integers&#39;</span>
      <span class="k">call </span><span class="n">printit</span><span class="p">(</span><span class="k">all</span><span class="p">([</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">z</span><span class="p">,</span><span class="n">ints</span><span class="p">,</span><span class="n">ithree</span><span class="p">].</span><span class="n">eq</span><span class="p">.[</span><span class="mi">10</span><span class="p">,</span><span class="mi">20</span><span class="p">,</span><span class="mi">30</span><span class="p">,</span><span class="mi">11</span><span class="p">,</span><span class="mi">22</span><span class="p">,</span><span class="mi">33</span><span class="p">,</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span><span class="o">-</span><span class="mi">3</span><span class="p">]))</span>

      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;default reals scalar&#39;</span>
      <span class="k">call </span><span class="n">printit</span><span class="p">(</span><span class="k">all</span><span class="p">([</span><span class="n">r_x</span><span class="p">,</span><span class="n">r_y</span><span class="p">,</span><span class="n">r_z</span><span class="p">].</span><span class="n">eq</span><span class="p">.[</span><span class="o">-</span><span class="mf">8.0</span><span class="p">,</span><span class="o">-</span><span class="mi">8</span><span class="mf">8.0</span><span class="p">,</span><span class="o">-</span><span class="mi">88</span><span class="mf">8.0</span><span class="p">]))</span>
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;default reals fixed array&#39;</span>
      <span class="k">call </span><span class="n">printit</span><span class="p">(</span><span class="k">all</span><span class="p">(</span><span class="n">rfour</span><span class="p">.</span><span class="n">eq</span><span class="p">.[</span><span class="mf">1.1</span><span class="p">,</span><span class="mf">2.2</span><span class="p">,</span><span class="mf">3.3</span><span class="p">,</span><span class="mf">4.4</span><span class="p">]))</span> 
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;default allocatable array&#39;</span>
      <span class="k">write</span><span class="p">(</span><span class="o">*</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="n">reals</span>
      <span class="k">write</span><span class="p">(</span><span class="o">*</span><span class="p">,</span><span class="o">*</span><span class="p">)[</span><span class="mf">1.2</span><span class="p">,</span><span class="mf">2.3</span><span class="p">,</span><span class="mf">3.4</span><span class="p">,</span><span class="mf">4.5</span><span class="p">,</span><span class="mf">5.6</span><span class="p">,</span><span class="mf">6.7</span><span class="p">,</span><span class="mf">7.8</span><span class="p">]</span>
      <span class="k">call </span><span class="n">printit</span><span class="p">(</span><span class="k">all</span><span class="p">(</span><span class="n">reals</span><span class="p">.</span><span class="n">eq</span><span class="p">.[</span><span class="mf">1.2</span><span class="p">,</span><span class="mf">2.3</span><span class="p">,</span><span class="mf">3.4</span><span class="p">,</span><span class="mf">4.5</span><span class="p">,</span><span class="mf">5.6</span><span class="p">,</span><span class="mf">6.7</span><span class="p">,</span><span class="mf">7.8</span><span class="p">]))</span>

      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;default logicals&#39;</span>
      <span class="k">call </span><span class="n">printit</span><span class="p">(</span><span class="k">all</span><span class="p">([</span><span class="n">l_x</span> <span class="p">,</span><span class="n">l_y</span><span class="p">,</span><span class="n">lfive</span><span class="p">,</span><span class="n">logicals</span><span class="p">].</span><span class="n">eqv</span><span class="p">.</span> <span class="p">&amp;</span>
      <span class="p">&amp;</span> <span class="p">[.</span><span class="n">true</span><span class="p">.,</span> <span class="p">.</span><span class="n">false</span><span class="p">.,</span> <span class="p">.</span><span class="n">true</span><span class="p">.,</span> <span class="p">.</span><span class="n">false</span><span class="p">.,</span> <span class="p">.</span><span class="n">true</span><span class="p">.,</span> <span class="p">.</span><span class="n">false</span><span class="p">.,</span> <span class="p">.</span><span class="n">true</span><span class="p">.,</span> <span class="p">.</span><span class="n">true</span><span class="p">.,</span> <span class="p">.</span><span class="n">true</span><span class="p">.,</span> <span class="p">.</span><span class="n">true</span><span class="p">.,</span> <span class="p">.</span><span class="n">false</span><span class="p">.,</span> <span class="p">.</span><span class="n">false</span><span class="p">.,</span> <span class="p">.</span><span class="n">false</span><span class="p">.,</span> <span class="p">.</span><span class="n">true</span><span class="p">.]))</span>

      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;default complex&#39;</span>
      <span class="k">call </span><span class="n">printit</span><span class="p">(</span><span class="k">all</span><span class="p">([</span><span class="n">c_x</span><span class="p">,</span><span class="n">c_y</span><span class="p">,</span><span class="n">c_z</span><span class="p">,</span><span class="n">c_three</span><span class="p">,</span><span class="n">c_aarr</span><span class="p">].</span><span class="n">eq</span><span class="p">.</span> <span class="p">[(</span><span class="nb">cmplx</span><span class="p">(</span><span class="o">-</span><span class="mi">999</span><span class="p">,</span><span class="o">-</span><span class="mi">999</span><span class="p">),</span><span class="n">i</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span><span class="mi">8</span><span class="p">)]))</span>

      <span class="k">call </span><span class="n">runit</span><span class="p">(</span><span class="s1">&#39;-x 4 -y 5 -z 6 -casen 1&#39;</span><span class="p">)</span>       <span class="c">! now call itself with some values specified</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;scalar ints&#39;</span>
      <span class="k">call </span><span class="n">printit</span><span class="p">(</span><span class="k">all</span><span class="p">([</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">z</span><span class="p">].</span><span class="n">eq</span><span class="p">.[</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">]))</span>       <span class="c">! options set on command line in previous case</span>
      <span class="k">call </span><span class="n">runit</span><span class="p">(</span><span class="s1">&#39;-r_x 40 -r_y 50 -r_z 60 -casen 2&#39;</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;scalar reals&#39;</span>
      <span class="k">call </span><span class="n">printit</span><span class="p">(</span><span class="k">all</span><span class="p">([</span><span class="n">r_x</span><span class="p">,</span><span class="n">r_y</span><span class="p">,</span><span class="n">r_z</span><span class="p">].</span><span class="n">eq</span><span class="p">.[</span><span class="mi">4</span><span class="mf">0.0</span><span class="p">,</span><span class="mi">5</span><span class="mf">0.0</span><span class="p">,</span><span class="mi">6</span><span class="mf">0.0</span><span class="p">]))</span>
      <span class="k">call </span><span class="n">runit</span><span class="p">(</span><span class="s1">&#39;-x 400 -y 500 -z 600 --ints -1,-2,-3 --ithree -11,-22,-33 -casen 3&#39;</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
      <span class="k">call </span><span class="n">printit</span><span class="p">(</span><span class="k">all</span><span class="p">([</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">z</span><span class="p">,</span><span class="n">ints</span><span class="p">,</span><span class="n">ithree</span><span class="p">].</span><span class="n">eq</span><span class="p">.[</span><span class="mi">400</span><span class="p">,</span><span class="mi">500</span><span class="p">,</span><span class="mi">600</span><span class="p">,</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span><span class="o">-</span><span class="mi">3</span><span class="p">,</span><span class="o">-</span><span class="mi">11</span><span class="p">,</span><span class="o">-</span><span class="mi">22</span><span class="p">,</span><span class="o">-</span><span class="mi">33</span><span class="p">]))</span>
      <span class="k">call </span><span class="n">runit</span><span class="p">(</span><span class="s1">&#39;-c_x &quot;(1,2)&quot; -c_y 10,20 -c_z &quot;(2#111,16#-AB)&quot; -c_three 1,2,3,4,5,6 -c_aarr 111::222,333::444 -casen 4&#39;</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span>
      <span class="c">! test results for case 4</span>

      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="n">gen</span><span class="p">)</span><span class="s1">&#39;CASE4 EXPECTED:&#39;</span><span class="p">,&amp;</span>
      <span class="p">[</span><span class="nb">cmplx</span><span class="p">(</span><span class="mf">1.0</span><span class="p">,</span><span class="mf">2.0</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">1</span><span class="mf">0.0</span><span class="p">,</span><span class="mi">2</span><span class="mf">0.0</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="o">-</span><span class="mi">171</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">111</span><span class="p">,</span><span class="mi">222</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">333</span><span class="p">,</span><span class="mi">444</span><span class="p">)]</span>
         
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="n">gen</span><span class="p">)</span><span class="s1">&#39;CASE4 RESULTS:&#39;</span><span class="p">,[</span><span class="n">c_x</span><span class="p">,</span><span class="n">c_y</span><span class="p">,</span><span class="n">c_z</span><span class="p">,</span><span class="n">c_three</span><span class="p">,</span><span class="n">c_aarr</span><span class="p">]</span>

      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="n">gen</span><span class="p">)</span><span class="s1">&#39;CASE4 TESTS:&#39;</span><span class="p">,[</span><span class="n">c_x</span><span class="p">,</span><span class="n">c_y</span><span class="p">,</span><span class="n">c_z</span><span class="p">,</span><span class="n">c_three</span><span class="p">,</span><span class="n">c_aarr</span><span class="p">].</span><span class="n">eq</span><span class="p">.&amp;</span>
      <span class="p">&amp;</span> <span class="p">[</span><span class="nb">cmplx</span><span class="p">(</span><span class="mf">1.0</span><span class="p">,</span><span class="mf">2.0</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">1</span><span class="mf">0.0</span><span class="p">,</span><span class="mi">2</span><span class="mf">0.0</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="o">-</span><span class="mi">171</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">111</span><span class="p">,</span><span class="mi">222</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">333</span><span class="p">,</span><span class="mi">444</span><span class="p">)]</span>

      <span class="k">call </span><span class="n">printit</span><span class="p">(</span><span class="k">all</span><span class="p">([</span><span class="n">c_x</span><span class="p">,</span><span class="n">c_y</span><span class="p">,</span><span class="n">c_z</span><span class="p">,</span><span class="n">c_three</span><span class="p">,</span><span class="n">c_aarr</span><span class="p">].</span><span class="n">eq</span><span class="p">.&amp;</span>
      <span class="p">&amp;</span> <span class="p">[</span><span class="nb">cmplx</span><span class="p">(</span><span class="mf">1.0</span><span class="p">,</span><span class="mf">2.0</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">1</span><span class="mf">0.0</span><span class="p">,</span><span class="mi">2</span><span class="mf">0.0</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="o">-</span><span class="mi">171</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">111</span><span class="p">,</span><span class="mi">222</span><span class="p">),</span><span class="nb">cmplx</span><span class="p">(</span><span class="mi">333</span><span class="p">,</span><span class="mi">444</span><span class="p">)]))</span>

      <span class="nb">flush</span><span class="p">(</span><span class="n">unit</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span>

      <span class="c">! run next case</span>
      <span class="k">call </span><span class="n">runit</span><span class="p">(</span><span class="s1">&#39;-x 400 -y 500 -z 600 --ints -1,-2,-3 -casen 900&#39;</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">6</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">7</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">8</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">9</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">900</span><span class="p">)</span>
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;USAGE&#39;</span>
      <span class="nb">flush</span><span class="p">(</span><span class="n">unit</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span>
      <span class="k">call </span><span class="n">runit</span><span class="p">(</span><span class="s1">&#39;--casen 901 --usage&#39;</span><span class="p">)</span>
      <span class="k">call </span><span class="n">runit</span><span class="p">(</span><span class="s1">&#39;--casen 901&#39;</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">901</span><span class="p">)</span>
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;HELP&#39;</span>
      <span class="nb">flush</span><span class="p">(</span><span class="n">unit</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span>
      <span class="k">call </span><span class="n">runit</span><span class="p">(</span><span class="s1">&#39;--casen 902 --help&#39;</span><span class="p">)</span>
      <span class="k">call </span><span class="n">runit</span><span class="p">(</span><span class="s1">&#39;--casen 902&#39;</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">902</span><span class="p">)</span>
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;VERSION&#39;</span>
      <span class="nb">flush</span><span class="p">(</span><span class="n">unit</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span>
      <span class="k">call </span><span class="n">runit</span><span class="p">(</span><span class="s1">&#39;--casen 999 --version&#39;</span><span class="p">)</span>
      <span class="k">call </span><span class="n">runit</span><span class="p">(</span><span class="s1">&#39;--casen 999&#39;</span><span class="p">)</span>
   <span class="k">case</span><span class="p">(</span><span class="mi">999</span><span class="p">)</span>
   <span class="k">case </span><span class="n">default</span>
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="s1">&#39;(a)&#39;</span><span class="p">)</span><span class="s1">&#39;default - should not get here&#39;</span>
      <span class="nb">flush</span><span class="p">(</span><span class="n">unit</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span>
      <span class="k">stop</span>
<span class="k">   end select</span>

<span class="k">contains</span>

<span class="k">subroutine </span><span class="n">runit</span><span class="p">(</span><span class="n">string</span><span class="p">)</span>
<span class="kt">character</span><span class="p">(</span><span class="nb">len</span><span class="o">=*</span><span class="p">),</span><span class="k">intent</span><span class="p">(</span><span class="n">in</span><span class="p">)</span> <span class="kd">::</span> <span class="n">string</span>
      <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="o">*</span><span class="p">)</span><span class="s1">&#39;RUN:&#39;</span><span class="p">,</span><span class="n">string</span>
      <span class="nb">flush</span><span class="p">(</span><span class="n">unit</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span>
      <span class="k">call </span><span class="nb">execute_command_line</span><span class="p">(</span><span class="n">cmd</span><span class="p">(:</span><span class="n">e</span><span class="p">)</span><span class="o">//</span><span class="n">string</span><span class="p">)</span>
<span class="k">end subroutine </span><span class="n">runit</span>

<span class="k">subroutine </span><span class="n">printit</span><span class="p">(</span><span class="n">testit</span><span class="p">)</span>
<span class="kt">logical </span><span class="n">testit</span>
   <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="s1">&#39;(*(g0,1x))&#39;</span><span class="p">,</span><span class="n">advance</span><span class="o">=</span><span class="s1">&#39;no&#39;</span><span class="p">)</span><span class="s1">&#39;CASE &#39;</span><span class="p">,</span><span class="n">casen</span><span class="p">,</span><span class="nb">merge</span><span class="p">(</span><span class="s1">&#39;PASSED:&#39;</span><span class="p">,</span><span class="s1">&#39;FAILED:&#39;</span><span class="p">,</span><span class="n">testit</span><span class="p">)</span>
   <span class="k">write</span><span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="s1">&#39;(/,a)&#39;</span><span class="p">)</span><span class="nb">repeat</span><span class="p">(</span><span class="s1">&#39;=&#39;</span><span class="p">,</span><span class="mi">132</span><span class="p">)</span>
   <span class="nb">flush</span><span class="p">(</span><span class="n">unit</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span>
<span class="k">end subroutine </span><span class="n">printit</span>

<span class="k">subroutine </span><span class="n">readcli</span><span class="p">()</span>
   <span class="nb">flush</span><span class="p">(</span><span class="n">unit</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span>
   <span class="k">call </span><span class="n">set_args</span><span class="p">(</span><span class="n">command</span><span class="p">)</span>
   <span class="c">! integer</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;x&#39;</span><span class="p">,</span><span class="n">x</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;y&#39;</span><span class="p">,</span><span class="n">y</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;z&#39;</span><span class="p">,</span><span class="n">z</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;ints&#39;</span><span class="p">,</span><span class="n">ints</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args_fixed_size</span><span class="p">(</span><span class="s1">&#39;ithree&#39;</span><span class="p">,</span><span class="n">ithree</span><span class="p">)</span>
   <span class="c">! logical</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;l_x&#39;</span><span class="p">,</span><span class="n">l_x</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;l_y&#39;</span><span class="p">,</span><span class="n">l_y</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;logicals&#39;</span><span class="p">,</span><span class="n">logicals</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args_fixed_size</span><span class="p">(</span><span class="s1">&#39;lfive&#39;</span><span class="p">,</span><span class="n">lfive</span><span class="p">)</span>
   <span class="c">! real</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;r_x&#39;</span><span class="p">,</span><span class="n">r_x</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;r_y&#39;</span><span class="p">,</span><span class="n">r_y</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;r_z&#39;</span><span class="p">,</span><span class="n">r_z</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;reals&#39;</span><span class="p">,</span><span class="n">reals</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args_fixed_size</span><span class="p">(</span><span class="s1">&#39;rfour&#39;</span><span class="p">,</span><span class="n">rfour</span><span class="p">)</span>
   <span class="c">! character</span>
   <span class="k">call </span><span class="n">get_args_fixed_length</span><span class="p">(</span><span class="s1">&#39;string&#39;</span><span class="p">,</span><span class="n">string</span><span class="p">)</span>
   <span class="c">! complex</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;c_x&#39;</span><span class="p">,</span><span class="n">c_x</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;c_y&#39;</span><span class="p">,</span><span class="n">c_y</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;c_z&#39;</span><span class="p">,</span><span class="n">c_z</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;c_aarr&#39;</span><span class="p">,</span><span class="n">c_aarr</span><span class="p">)</span>
   <span class="k">call </span><span class="n">get_args_fixed_size</span><span class="p">(</span><span class="s1">&#39;c_three&#39;</span><span class="p">,</span><span class="n">c_three</span><span class="p">)</span>
   <span class="c">!</span>
   <span class="k">call </span><span class="n">get_args</span><span class="p">(</span><span class="s1">&#39;casen&#39;</span><span class="p">,</span><span class="n">casen</span><span class="p">)</span>
<span class="k">end subroutine </span><span class="n">readcli</span>

<span class="k">end program </span><span class="n">basic</span>
</pre></div>

    </section>
    
    
    </div>
  </div>

  
    <hr>    
    </div> <!-- /container -->
    <footer>
      <div class="container">
      <div class="row">
        <div class="col-xs-6 col-md-4"><p>&copy; 2022 
                                          </p></div>
        <div class="col-xs-6 col-md-4 col-md-push-4">
          <p class="text-right">
            Documentation generated by 
            <a href="https://github.com/cmacmackin/ford">FORD</a>
             on 2022-06-08 21:13  
          </p>
        </div>
        <div class="col-xs-12 col-md-4 col-md-pull-4"><p class="text-center"> M_CLI2 was developed by John S. Urban</p></div>
      </div>
      <br>
      </div> <!-- /container -->    
    </footer>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
<!--
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
-->
    <script src="../js/bootstrap.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script src="../js/ie10-viewport-bug-workaround.js"></script>

    <!-- MathJax JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        TeX: { extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js'], equationNumbers: { autoNumber: 'AMS' } },
        jax: ['input/TeX','input/MathML','output/HTML-CSS'],
        extensions: ['tex2jax.js','mml2jax.js','MathMenu.js','MathZoom.js']
      });
    </script>
    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    
    <script src="../tipuesearch/tipuesearch_content.js"></script>
    <script src="../tipuesearch/tipuesearch_set.js"></script>
    <script src="../tipuesearch/tipuesearch.js"></script>
    
    
  </body>
</html>